package com.example.demo;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class Junit4Test3 {

    private int i = 0;

    /**
     * junit4 order by fixMethodOrder
     */
    @Test
    public void cc() {
        i+=10;
        System.out.println(i);
    }

    @Test
    public void bb() {
        i-=5;
        System.out.println(i);
    }

    @Test
    public void aa() {
        i+=30;
        System.out.println(i);
    }
}
